package cn.felord.cloud.consumer.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author Dax
 * @since 13:30  2019-08-14
 */
@Component
public class FooFallbackFactory implements FallbackFactory<FooService> {
    @Override
    public FooService create(Throwable cause) {
        return new FooService() {
            @Override
            public String foo() {
                return "服务不可用";
            }
        };
    }
}
